DATA_adm_header
DATA_adm_menu
<script language="javascript" type="text/javascript" src="show_files/overlib_.js"></script>
<script language="javascript" type="text/javascript" src="show_files/overlib0.js"></script>

<form name="AddUserForm" method="post" action="" onSubmit="return validateForm(this);">
<div align="center" class="centermain">
<div class="main">

<table class="adminheading">
	<tr>
		<th class="edit" rowspan="2" nowrap="nowrap">
			User Manager <small><small>[ Section: DATA_section ]</small></small>
		</th>
		<td valign="bottom" align="right" rowspan="2" valign="top">
			DATA_sort_username
		</td>
	</tr>
</table>


<table width="100%">
	<tr>
		<td valign="top">
			<table width="100%" class="adminform">
				<tr>
					<th colspan="2">
						User Details
					</th>
				<tr>
				<tr">
					<td colspan="2">
						<div align="center"><font color="red"><b>DATA_error_message</b></font></div>
					</th>
				<tr>
				<tr>
					<td colspan="2">
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
						Username:
					</td>
					<td >
						<input class="inputbox" type="text" name="inp_username" value="DATA_val_username" size="50" maxlength="100" />
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
						Password:
					</td>
					<td >
						<input class="inputbox" type="password" name="inp_password" value="DATA_val_password" size="50" maxlength="100" />
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
						Password (<i>retype</i>):
					</td>
					<td >
						<input class="inputbox" type="password" name="inp_password2" value="DATA_val_password" size="50" maxlength="100" />
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
						Active:
					</td>
					<td width="40%">			
						<select name="inp_active" class="inputbox" size="1" >
							<option value="Y" DATA_val_select1>Yes</option>
							<option value="N" DATA_val_select2>No</option>
						</select>
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
						Suspend:
					</td>
					<td width="40%">			
						<select name="inp_suspend" class="inputbox" size="1" >
							<option value="Y" DATA_val_select3>Yes</option>
							<option value="N" DATA_val_select4>No</option>
						</select>
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
						Name:
					</td>
					<td >
						<input class="inputbox" type="text" name="inp_name" value="DATA_val_name" size="50" maxlength="100" />
					</td>
				</tr>
				<tr>
					<td align="right">
						Company Name:
					</td>
					<td>
						<input class="inputbox" type="text" name="inp_company" value="DATA_val_company" size="50" maxlength="100" />
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">
						Address:
					</td>
					<td>
						<textarea name="inp_address" rows="5" cols="50" class="inputbox">DATA_val_address</textarea>
					</td>
				</tr>
				<tr>
					<td align="right">
						Postal Code/ZIP:
					</td>
					<td>
						<input class="inputbox" type="text" name="inp_zip" value="DATA_val_zip" size="25" maxlength="10" />
					</td>
				</tr>
				<tr>
					<td align="right">
						City:
					</td>
					<td>
						<input class="inputbox" type="text" name="inp_city" value="DATA_val_city" size="50" maxlength="20" />
					</td>
				</tr>
				<tr>
					<td align="right">
						Country:
					</td>
					<td>
						<input class="inputbox" type="text" name="inp_country" value="DATA_val_country" size="50" maxlength="50" />
					</td>
				</tr>
				<tr>
					<td align="right">
						E-mail:
					</td>
					<td>
						<input class="inputbox" type="text" name="inp_email" value="DATA_val_email" size="50" maxlength="50" />
					</td>
				</tr>
				<tr>
					<td align="right">
						TAV Number:
					</td>
					<td>
						<input class="inputbox" type="text" name="inp_tav" value="DATA_val_tav" size="50" maxlength="50" />
					</td>
				</tr>
				<tr>
					<td align="right">
						Telephone:
					</td>
					<td>
						<input class="inputbox" type="text" name="inp_telp" value="DATA_val_telp" size="25" maxlength="25" />
					</td>
				</tr>
				<tr>
					<td align="right">
						Fax:
					</td>
					<td>
						<input class="inputbox" type="text" name="inp_fax" value="DATA_val_fax" size="25" maxlength="25" />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<input class="inputbox" type="hidden" name="inp_userid" value="DATA_val_userid" size="25" maxlength="25" />
					</td>
				</tr>
			</table>

</div>
</div>
</form>

<div align="center">
	<br/><b>KINI Indonesia - Administration Panel</b><br/>Jl. Wates Km.12, Gubug, Argosari, Sedayu, Bantul Yogyakarta 55752 Indonesia 
</div>

<div id="login_alert" style="display:none;">You must provide a username</div>
<div id="password_alert" style="display:none;">You must provide a password</div>
<div id="password2_alert" style="display:none;">Please enter confirm password same as password</div>
<div id="email_alert" style="display:none;">You must provide a valid email address</div>


<script language="javascript">
  setFocusOnUserName();
 
function setFocusOnUserName()
	{
		document.AddUserForm.inp_username.focus();
	}

function kliksubmit()
{
	validateForm(AddUserForm);
}
function isNum(val) {

   if (val.value.length != 0) {
   
      for (i = 0; i < val.value.length; i++) 
	  {
         var ch = val.value.charAt(i);
		 
         if (ch >= "0" && ch <= "9") 
		  continue;
          else 
		  	{
				alert(document.getElementById('Num_value').innerHTML+"\\n");
				val.value = "";
		 		val.focus();
		  		
			false;
          	}
      	}
   	}
   return true;
} 

function validateForm(frm)
	{
	var message='';
	var ckeckFocus=0;
	
	if(frm.inp_username.value=='')
	{

	
			if(ckeckFocus!=1)
				frm.inp_username.focus();
				message=message+document.getElementById('login_alert').innerHTML+"\\n";		
			var ckeckFocus=1;	     	  
		} 
//	else
//		{ 
//			var ret=Valid_username(frm.inp_username.value);
//			
//			if(ret==1)
//				{
//
//				if(ckeckFocus!=1)
//					frm.inp_username.focus();
//					message=message+document.getElementById('login_exists').innerHTML+"\\n";	
//					var ckeckFocus=1;	
//				}
//		}		
	
	if(frm.inp_password.value=='')
	{
	
			if(ckeckFocus!=1)
				frm.inp_password.focus();
				message=message+document.getElementById('password_alert').innerHTML+"\\n";	
			var ckeckFocus=1;	     	  
		} 	
	else
		{
			if(frm.inp_password.value!=frm.inp_password2.value)
				{
		
				if(ckeckFocus!=1)
					frm.inp_password2.focus();
					message=message+document.getElementById('password2_alert').innerHTML+"\\n";	
					var ckeckFocus=1;	
				}
		}		
	
	if(frm.inp_email.value=='')
    {

		if(ckeckFocus!=1)
			frm.inp_email.focus();	
			message=message+document.getElementById('email_alert').innerHTML+"\\n";	       	
		var ckeckFocus=1;
	}
	else
	{
		var frmEmail1 =frm.inp_email.value.toLowerCase();	
		var frmEmailformat = /^[^@\s]+@([-a-z0-9]+\.)+([a-z]{2}|com|net|edu|org|gov|mil|int|biz|pro|info|arpa|aero|coop|name|museum)$/;
		if (!frmEmailformat.test(frmEmail1)) 
		{
			if(ckeckFocus!=1)
				frm.inp_email.focus();	
				message=message+document.getElementById('email_alert').innerHTML+"\\n";	
			var ckeckFocus=1;
		}
//		else
//		{ 
//		var ret2=Valid_email(frm.inp_email.value); 
//		if(ret2==1)
//			{
//
//			if(ckeckFocus!=1)
//				frm.inp_email.focus();
//				message=message+document.getElementById('email_exists').innerHTML+"\\n";	
//				var ckeckFocus=1;	
//			}
//		}	
	}
		
	if(message)
	{	  
		alert(message);
//		return false;
	}
	else
	{
//	alert('udah sampe nih');
		frm.submit();
//		return true;
	}
}	


</script>

</body>
</html>
